package com.myjaveStatic;

public class Demo2 {
    public static void main(String[] args) {
        int[] arr = {0,1,3,4};
        int x = 0;
        for(int i=0;i<=arr.length;i++){
            x^=i;
        }
        for (int j:arr
             ) {
            x^=j;

        }
        System.out.println(x);
    }
}
